<template>
  <div id="mobile">
    <index></index>
  </div>
</template>

<script>
import index from '@/components/index.vue'
export default {
  name: 'mobile',
  components: {
    index
  },
  data () {
    return {

    }
  },
  mounted(){
    var arr = window.location.href.split('/')
    console.log(arr)
    if(!this._isMobile() && arr[arr.length-1] == 'mobile.html'){
      window.location.href = '/marketing/consulation/pc.html'
    }
  },
  methods: {
  _isMobile() {
      let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
      return flag;
    }
  }
}
</script>

<style>
  #mobile {
    text-align: center;
  }
</style>
